HTMLForm: Allow i18n of 'options'
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 18 Feb 2014 20:28:06 +0000 (15:28 -0500)
committerReedy <reedy@wikimedia.org>
Wed, 19 Feb 2014 23:26:23 +0000 (23:26 +0000)
commitf88fcb746139b5f1da6c319689a551fb89f17b91
treeab7cdf0f73790cc41720284634f920df232b8807
parentbec75cc99f52c8f2fd406f359cccc4d7c44cd253
HTMLForm: Allow i18n of 'options'

One shortcoming in HTMLForm is that fields that use the 'options'
parameter (e.g. <select>) have no easy way for the individual labels to
be localized.

This change adds a new parameter type, 'options-messages', where the
keys are message keys rather than bare strings (similar to the
difference between 'label' and 'label-message'). It also abstracts out
the fetching of the various option parameters, and changes the necessary
field classes to use it.

Change-Id: If4175332405d26c7ff2e8fbe100bcad61762ce6f
RELEASE-NOTES-1.23
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/HTMLMultiSelectField.php
includes/htmlform/HTMLRadioField.php
includes/htmlform/HTMLSelectAndOtherField.php
includes/htmlform/HTMLSelectField.php
includes/htmlform/HTMLSelectOrOtherField.php